<template>
  <div class="jumbotron" style="text-align: center;background-color: #EFF2F7">
    <h1>欢迎来到配置中心:uacc！</h1>
    <p>&nbsp;</p>
    <h2>当前用户：<span style="color: #13CE66;font-weight: bold">{{currentUser | getName}}</span></h2>
    <el-dropdown>
      <span class="el-dropdown-link">
        <a style="text-decoration: none"><h2>问题帮助</h2></a>
      </span>
      <el-dropdown-menu slot="dropdown">
        <img src="../../assets/img/erweima.jpg" class="image" style="width: 250px">
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<style scoped>
  .time {
    font-size: 13px;
    color: #999;
  }

  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }

  .button {
    padding: 0;
    float: right;
  }

  .image {
    width: 100%;
    display: block;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }

  .clearfix:after {
    clear: both
  }
</style>
<script>
  import {mapState} from 'vuex';
  export default {
    data: function () {
      return {currentDate: new Date()}
    },
    computed: mapState(['currentUser']),
    filters: {
      getName: function (value) {
        if (value) {
          if (value.nickName || value.nickName == "") {
            return value.lastName + ' <' + value.empId + '>';
          } else {
            if (value.nickName) {
              return value.nickName + ' <' + value.empId + '>';
            } else {
              return '暂无用户信息'
            }
          }
        } else {
          return '暂无用户信息';
        }
      }
    },
    methods: {}
  }
</script>
